<?php

class DefaultController extends C {

    function DefaultController() {
        $this->textCss("common.css");
    }

    function index() {
	
        if (!isset($_SESSION['uid']) && intval($_SESSION['uid']) <= 0)
            redirect("/default/login");
        else
            redirect("/default/main");
    }

    function login() {

        if (isset($_POST['usr']) && isset($_POST['pwd'])) {

            redirect("/default/main");
        }

        $this->display("login.html");
    }

    function main() {
        $this->assign("title", "台后管理");
        $this->display("main.html");
    }

    function mainContent() {
        
    }

    function mainHead() {
        $this->display("public/mainHead.html");
    }

    function mainMenu() {
        $this->display("public/mainMenu.html");
    }

}